// $Id: ast_bodybuilder.h 29 2015-03-11 03:49:12Z robim.poa@gmail.com $
//-----------------------------------------------------------------------------
// Purpose: Scans code body parts and build AST tree.
// $Rev: 29 $
// $Author: robim.poa@gmail.com $
// $Date: 2015-03-11 03:49:12 +0000 (Wed, 11 Mar 2015) $

#ifndef AST_BODYBUILDER_H
#define AST_BODYBUILDER_H

#include "text_processing.h"
#include "ast.h"

struct node_ast* Scan(FILE *pfile, struct tp_node_var* nodep_var_head);

struct node_ast* ScanBody(FILE *pfile, struct tp_node_var* nodep_var_head);

struct node_ast* GetInstruction(FILE *pfile, struct tp_node_var* nodep_var_head);

void stDeclaration(FILE*, struct tp_node_var* nodep_var_head, int);

struct node_ast* stExpression(FILE* pfile, struct tp_node_var* nodep_var_head, int expression_kind);

void PrintVars(struct tp_node_var*);

struct node_ast* bbStatementIf(FILE *pfile, struct tp_node_var* nodep_var_head);

struct node_ast* bbStatementWhile(FILE *pfile, struct tp_node_var* nodep_var_head);

struct node_ast* bbStatementFor(FILE *pfile, struct tp_node_var* nodep_var_head);

#endif